package com.courseware.online.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author : demos
 */
@Configuration
public class AppConfig {
    @Value("${app.dowload-path:download/}")
    private String dowloadPath;

    @Value("${app.dowload-url:/api/courseware/download/}")
    private String downloadUrl;

    public String getDowloadPath() {
        String projectPath = System.getProperty("user.dir");
        return projectPath + "/" +dowloadPath;
    }

    public void setDowloadPath(String dowloadPath) {
        this.dowloadPath = dowloadPath;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }
}
